import request from '../utils/request';
// var qs=require('qs')
export const fetchData = query => {
    return request({
        url: './table.json',
        method: 'get',
        params: query
    });
};


export const denglu = query => {
    return request({
        url: 'http://localhost:8085/tb-userinfo/web/dengLu',
        method: 'post',
        params: query
    });
};


export const activityinfolist=()=> {
    return request({
        url: 'http://localhost:8085/tb-activityinfo/web/ActivityInfoList',
        method: 'post',
        
    });
};

export const addactivityinfo=(params)=> {
    return request({
        url: 'http://localhost:8085/tb-activityinfo/teacher/addActivityinfo',
        method: 'post',
        params:params
    });
};

export const updateactivityinfo=(params)=> {
    return request({
        url: 'http://localhost:8085/tb-activityinfo/web/updateActivityInfo',
        method: 'put',
        params:params
    });
};


export const deleteactivityinfo=(param)=> {//不可以使用
    return request({
        url: 'http://localhost:8085/tb-activityinfo/web/deleteActivityInfo',
        method: 'put',
        params:param,
        // headers:{'Content-Type':'application/x-www-form-urlencoded'}

        //  params:qs.stringify(param)
    });
};
//https://blog.csdn.net/qq_36069339/article/details/106737372调接口 https://blog.csdn.net/weixin_34248258/article/details/94604849
//

export const deleteactivityinfo1=(param)=> {//可以使用
    return request({
        url: 'http://localhost:8085/tb-activityinfo/web/deleteActivityInfo?activity_id='+param,
        method: 'put',
        //params:param,
        // headers:{'Content-Type':'application/x-www-form-urlencoded'}

        //  params:qs.stringify(param)
    });
};
//https://blog.csdn.net/qq_36069339/article/details/106737372调接口 https://blog.csdn.net/weixin_34248258/article/details/94604849
//

